﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XChipMatlab
{
    using global::XChipYedge;
    using MathWorks.MATLAB.NET.Arrays;
    using MathWorks.MATLAB.NET.Utility;
    public class XChipYedge
    {
        public  Yedge yedge;

        public XChipYedge() {
            yedge = new Yedge();
        }

        public void Dispose() {
            GC.SuppressFinalize(this);
        }
        /// <summary>
        /// yedge 生成
        /// </summary>
        /// <param name="_shoot_x_node">x坐标值</param>
        /// <param name="_shoot_y_node">y坐标值</param>
        /// <param name="file_name_reg_in1">输出寄存器文本</param>
        /// <param name="file_name_bmp_in1">输出图片路劲</param>
        /// <returns></returns>
        public  string[] yedgeGen(int[] _shoot_x_node, int[] _shoot_y_node, string file_name_reg_in1, string file_name_bmp_in1) {
            string[] strlist = new string[2];
            MWArray shoot_x_node = (MWIndexArray)_shoot_x_node;
            MWArray shoot_y_node = (MWIndexArray)_shoot_y_node;
            var fileArray = yedge.para_gen(2, shoot_x_node, shoot_y_node, file_name_reg_in1, file_name_bmp_in1);
            for (int i = 0; i < fileArray.Count(); i++)
            {
                strlist[i] = fileArray[i].ToString();
            }
            return strlist;
        }

    }
}
